//
//  MyWorkTimeViewController.swift
//  HuaYun
//
//  Created by enghou on 2018/11/27.
//  Copyright © 2018 xyxorigation. All rights reserved.
//

import UIKit



class MyWorkTimeViewController: BaseViewController,UIWebViewDelegate {

    let progressProxy = YHWebViewProgress()
    let webView = UIWebView()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationItem.hidesBackButton = true
        let back = UIBarButtonItem.init(image: UIImage.init(named: "icon_nav_whiteback")!.withRenderingMode(.alwaysOriginal), style: .plain, target: self, action: #selector(popobjc))
        back.tintColor = .white
        self.navigationItem.leftBarButtonItem = back
        webView.loadRequest(URLRequest.init(url: URL.init(string: "https://tms.hyit.com.cn/tasktracking/m/#/task-tracking")!))
        self.view.addSubview(webView)
        let progressView = YHWebViewProgressView.init(frame: CGRect.init(origin: CGPoint.init(x: 0, y: 0), size: CGSize(width: self.view.width, height: 2)))
        progressView.autoresizingMask = UIView.AutoresizingMask.init(rawValue: UIView.AutoresizingMask.flexibleWidth.rawValue + UIView.AutoresizingMask.flexibleBottomMargin.rawValue)
        self.progressProxy.progressView = progressView
        self.webView.delegate = self.progressProxy
        self.view.addSubview(progressView)
        // Do any additional setup after loading the view.
    }
    
    override func viewWillLayoutSubviews() {
        super.viewWillLayoutSubviews()
        webView.frame = self.view.bounds
    }

}
